<div [@flyIn]="'active'">
  <div class="wrapper-sm">
    <div class="panel panel-default m-t-n-xs m-b-n-xs" style="border-radius:5px;">

      <div class="panel panel-default" style="margin-bottom:-5px;border-radius:5px">
        <div class="panel-body" style="font-size: 10px;padding:5px 20px; " >
          <div class="row">
            <div class="col-xs-3 m-t-xs m-t-sm">
              <span>设备监控</span>
              <i class="fa fa-angle-right"></i>
              <span>单机监控</span>
              <i class="fa fa-angle-right"></i>
              <span>设备列表</span>
            </div>
            <div class="col-xs-9" >
              <form class="form-inline row pull-right">
                <app-select (search)="oo=$event;getData()"></app-select>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="wrapper-sm" >
    <div class="panel panel-default" style="border-radius:5px">
      <div class="panel-body" >
        <table  class="table table-hover table-striped m-b-none default footable " style="font-size: 12px;">
          <thead>
          <tr>
            <th style="width:3%"></th>
            <th  style="width:15%">型号</th>
            <th  style="width:10%">设备别名</th>
            <th  style="width:10%">空压机序号</th>
            <th  style="width:10%">设备自定义名称</th>
            <th  style="width:10%">设备所在组</th>
            <th  style="width:15%">终端用户</th>
            <th  style="width:10%">状况</th>
            <th style="width:7%">关注状态</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let aaData of data">
            <td>
              <input type="checkbox" (click)="fn($event,aaData.id)" *ngIf="aaData.guanzhu==0"/>
              <input type="checkbox" [(ngModel)]="aaData.guanzhu" disabled="disabled" *ngIf="aaData.guanzhu==1"/>
            </td>
            <td>
              <a *ngIf="aaData.monitor_path.split('(')[0].split('.')[1] != 'singlemonitorAirSwitch'"
                [routerLink]="['../../../../../../access/'+aaData.monitor_path.split('(')[0].split('.')[1],aaData.id]" target="_blank">
                <span style="color: blue">{{aaData.model}}</span>
              </a>
              <a *ngIf="aaData.monitor_path.split('(')[0].split('.')[1] == 'singlemonitorAirSwitch'">
                <span style="color: blue">{{aaData.model}}</span>
              </a>
            </td>
            <td>{{aaData.alias_name}}</td>
            <td>{{aaData.sn}}</td>
            <td>{{aaData.xcxlh}}</td>
            <td>{{aaData.group_name}}</td>
            <td>{{aaData.zdyh}}</td>
            <!-- <td><span class="label bg-success inline m-t-xs">在线</span></td> -->
            <td>
              <span  class="label bg-success inline m-t-xs" *ngIf="aaData.online=='在线'">{{aaData.online}}</span>
              <span class="label bg-danger inline m-t-xs" *ngIf="aaData.online=='离线'">{{aaData.online}}</span>
              <a [routerLink]="['../../deviceonlines',aaData.id]"><span class="label bg-info inline m-t-xs">记录</span></a>
            </td>
           <!--  <td >
              
              <span class="label bg-info inline m-t-xs">记录</span>
            </td> -->
            <td *ngIf="aaData.guanzhu==0"><span><i class="fa fa-star fa-lg" style="color:#999"></i></span></td>
            <td *ngIf="aaData.guanzhu==1"><span><i class="fa fa-star fa-lg" style="color:#f08300"></i></span></td>
          </tr>
          </tbody>
        </table>

        <div class="pull-left m-t-md" >
          <button class="btn btn-sm monitor-btn" (click)="follow()">关注</button>
        </div>

        <app-pagination [pageModel]="pageModel" (pageChanged)="page=$event;getData()"></app-pagination>

      </div>
    </div>
  </div>
</div>
